<template>
	<view>
		<!-- @click="NAVPAGE('/pages/content/privateChat/privateChat')" -->
		<view class="messageType" v-for="(item,index) in list" :key="index"
			@click="NAVPAGE(`/pages/home/PersonalData/PersonalData?id=${item.user.id}`)">
			<view class="headImg">
				<image :src="item.user.headimg" mode="scaleToFill"></image>
				<view class="name">{{item.user.nickname}}</view>
			</view>
			<view class="create">
				<view>{{item.create_at}}</view>
			</view>
		</view>
		<view style="margin-top: 200rpx;">
			<u-empty v-if="list.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
			</u-empty>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.GetLikes()
		},
		methods: {
			//用户的关注/收藏
			Clear() {
				this.$api.CollectionNotice().then(res => {})
			},
			GetLikes() {
				this.$api.attentionNotification().then(res => {
					this.list = res.data.list
					this.Clear()
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f7f7f7;
	}

	.messageType {
		margin: 20rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 30rpx;
		border-radius: 10rpx;
		background-color: #ffffff;

		.headImg {
			display: flex;
			align-items: center;

			image {
				width: 100rpx;
				height: 100rpx;
				display: block;
				border-radius: 10rpx;
			}

			.name {
				font-size: 30rpx;
				color: #000;
				margin-left: 20rpx;
			}

		}

		.create {
			font-size: 26rpx;
			color: #909099;



		}
	}
</style>